//取整。。。
//我直接面向结果编程
public class HomeWork04 {
    public static void main(String[] args){
        int s[][]= {{80,67,78,90},{87,89,75,95}, {66,77,88,92}, {78,74,80,89},{69,73,80,88}};
        for(int i=1; i<=5;++i){
            int sum = 0;
            double ave = 0;
            sum = s[i-1][0]+s[i-1][1]+s[i-1][2]+s[i-1][3];
            ave = (int)1.0*sum/4;
            System.out.printf("student %d:sum=%d,ave=%.1f\n",i,sum,ave);
        }
        for(int i=1; i<=4; ++i){
            int sum = 0;
            double ave = 0;
            sum  = s[0][i-1]+s[1][i-1]+s[2][i-1]+s[3][i-1]+s[4][i-1];
            ave = (int)1.0*sum/5;
            System.out.printf("course %d:ave=%.1f\n",i,ave);
        }
    }
}
